#include <bits/stdc++.h>
using namespace std;
#ifdef W_DEBUG
#define DOUT(a) cerr << __FILE__ << ':' << __LINE__ << ":D:" << a << endl
#else
#define DOUT(a) void(0)
#endif
using ll = long long;

namespace s1
{
    void Main()
    {
	ll n;
	cin >> n;
	DOUT(n);
	vector<ll> a(n);
	for (auto& i : a)
	{
	    cin >> i;
//	    DOUT(i);
	}
	sort(a.begin(), a.end());
	priority_queue<int> b;
	for (int i = 0; i < n; ++i)
	{
//	    DOUT(i << ' ' << b.size());
	    if (not b.empty())
	    {
		//	DOUT(-b.top() << ' ' << i);
	    }
	    if (not b.empty() and -b.top() < a[i])
	    {
//		DOUT(i << '>' << -b.top());
		b.pop();
	    }
	    b.push(-a[i]);
	    if (i % 1000 == 0)
	    {
		DOUT(i);
	    }
	}
	cout << b.size();
    }
}

int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
#define W_NAME "duel"
    freopen(W_NAME ".in", "r", stdin);
    freopen(W_NAME ".out", "w", stdout);
    s1::Main();
    return 0;
}
